package cn.edu.zju.gis.disasterBE.sever.controller;

import cn.edu.zju.gis.disasterBE.sever.commons.annotation.PassToken;
import cn.edu.zju.gis.disasterBE.sever.entity.TwitterEmotion;
import cn.edu.zju.gis.disasterBE.sever.entity.TwitterQuery;
import cn.edu.zju.gis.disasterBE.sever.entity.global.MyResponse;
import cn.edu.zju.gis.disasterBE.sever.service.TwitterEmotionService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api("社交媒体模块")
@RestController
@RequestMapping("/media")
@RequiredArgsConstructor(onConstructor_ = {@Autowired})
public class TwitterEmotionController {
    private final TwitterEmotionService twitterEmotionService;

    @PassToken
    @ApiOperation("获得数据库中6条情感记录")
    @GetMapping("/twitterEmotionGet12")
    public MyResponse<List<TwitterQuery>> twitterEmotionGet()
    {
        return twitterEmotionService.twitterEmotionGet12();
    }

}
